import request from '@/utils/request'
import { ResultVoid, DeepRequired } from '../../interface'

/**
 * 绑定或修改电话
 * /user/phone
 */
export function putUserPhone(params: PutUserPhoneParams) {
  const paramsInput = {
    phone: params.phone,
  }
  return request.put<DeepRequired<ResultVoid>>(`/user/phone`, null, {
    params: paramsInput,
  })
}

interface PutUserPhoneParams {
  phone: string
}
